package com.leejxx.admin.controller.v1;

import com.leejxx.admin.service.AdUserService;
import com.leejxx.model.common.dto.ResponseResult;
import com.leejxx.model.admin.dtos.UserDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author LeeJx
 * @ClassName AdUserController
 * @Description TODO
 * @date 2021/2/19 18:00
 * @Version 1.0
 */
@RestController
@Slf4j
@RequestMapping("/login")
public class AdUserController {
    @Autowired
    private AdUserService adUserService;

    @RequestMapping("/in")
    public ResponseResult login(@RequestBody UserDto userDto) {
        log.info("[data]{}", userDto);
        return adUserService.login(userDto);
    }
}
